package com.adingxiong.quickstart.project.entity.vo;

import com.adingxiong.quickstart.project.entity.Files;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName FileVo
 * @Description TODO
 * @Author xiongchao
 * @Date 2020/6/2 11:06
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Files对象", description="固件更新信息")
public class FileVo implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "文件路径")
    private String fileUrl;

    @ApiModelProperty(value = "更新说明")
    private String content;

    @ApiModelProperty(value = "更新版本号")
    private String version;

    @ApiModelProperty(value = "商品名称id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "更新日志")
    private String updateLog;


    public FileVo (Files file){
        BeanUtils.copyProperties(file,this);
    }
}